home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / AIncludes / ASDebugging.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  8.2 KB  |  282 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ASDebugging.a
  3. ;
  4. ;    Contains:    AppleScript Debugging Interfaces.
  5. ;
  6. ;    Version:    Technology:    AppleScript 1.1
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1992-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__ASDEBUGGING__') = 'UNDEFINED' THEN
  18. __ASDEBUGGING__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  24.     include 'Files.a'
  25.     ENDIF
  26.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  27.     include 'Components.a'
  28.     ENDIF
  29.     IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
  30.     include 'AppleEvents.a'
  31.     ENDIF
  32.     IF &TYPE('__APPLESCRIPT__') = 'UNDEFINED' THEN
  33.     include 'AppleScript.a'
  34.     ENDIF
  35.  
  36. ; **************************************************************************
  37. ;    Mode Flags
  38. ;*************************************************************************
  39.  
  40. ;      This mode flag can be passed to OSASetProperty or OSASetHandler
  41. ;    and will prevent properties or handlers from being defined in a context
  42. ;    that doesn't already have bindings for them. An error is returned if
  43. ;    a current binding doesn't already exist. 
  44. ;
  45.  
  46.  
  47. kOSAModeDontDefine                EQU        $0001
  48. ; **************************************************************************
  49. ;    Component Selectors
  50. ;*************************************************************************
  51.  
  52.  
  53. kASSelectSetPropertyObsolete    EQU        $1101
  54. kASSelectGetPropertyObsolete    EQU        $1101
  55. kASSelectSetHandlerObsolete        EQU        $1103
  56. kASSelectGetHandlerObsolete        EQU        $1104
  57. kASSelectGetAppTerminologyObsolete EQU    $1105
  58. kASSelectSetProperty            EQU        $1106
  59. kASSelectGetProperty            EQU        $1107
  60. kASSelectSetHandler                EQU        $1108
  61. kASSelectGetHandler                EQU        $1109
  62. kASSelectGetAppTerminology        EQU        $110A
  63. kASSelectGetSysTerminology        EQU        $110B
  64. kASSelectGetPropertyNames        EQU        $110C
  65. kASSelectGetHandlerNames        EQU        $110D
  66. ; **************************************************************************
  67. ;    Context Accessors
  68. ;*************************************************************************
  69.  
  70. ;
  71. ; pascal OSAError OSASetProperty(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, const AEDesc *variableName, OSAID scriptValueID)
  72. ;
  73.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  74.         Macro
  75.         _OSASetProperty
  76.             move.l              #$00101106,-(sp)
  77.             moveq               #0,D0
  78.             dc.w                $A82A
  79.         EndM
  80.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  81.         IMPORT_CFM_FUNCTION OSASetProperty
  82.     ENDIF
  83.  
  84. ;
  85. ; pascal OSAError OSAGetProperty(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, const AEDesc *variableName, OSAID *resultingScriptValueID)
  86. ;
  87.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  88.         Macro
  89.         _OSAGetProperty
  90.             move.l              #$00101107,-(sp)
  91.             moveq               #0,D0
  92.             dc.w                $A82A
  93.         EndM
  94.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  95.         IMPORT_CFM_FUNCTION OSAGetProperty
  96.     ENDIF
  97.  
  98. ;
  99. ; pascal OSAError OSAGetPropertyNames(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, AEDescList *resultingPropertyNames)
  100. ;
  101.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  102.         Macro
  103.         _OSAGetPropertyNames
  104.             move.l              #$000C110C,-(sp)
  105.             moveq               #0,D0
  106.             dc.w                $A82A
  107.         EndM
  108.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  109.         IMPORT_CFM_FUNCTION OSAGetPropertyNames
  110.     ENDIF
  111.  
  112. ;
  113. ; pascal OSAError OSASetHandler(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, const AEDesc *handlerName, OSAID compiledScriptID)
  114. ;
  115.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  116.         Macro
  117.         _OSASetHandler
  118.             move.l              #$00101108,-(sp)
  119.             moveq               #0,D0
  120.             dc.w                $A82A
  121.         EndM
  122.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  123.         IMPORT_CFM_FUNCTION OSASetHandler
  124.     ENDIF
  125.  
  126. ;
  127. ; pascal OSAError OSAGetHandler(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, const AEDesc *handlerName, OSAID *resultingCompiledScriptID)
  128. ;
  129.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  130.         Macro
  131.         _OSAGetHandler
  132.             move.l              #$00101109,-(sp)
  133.             moveq               #0,D0
  134.             dc.w                $A82A
  135.         EndM
  136.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  137.         IMPORT_CFM_FUNCTION OSAGetHandler
  138.     ENDIF
  139.  
  140. ;
  141. ; pascal OSAError OSAGetHandlerNames(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, AEDescList *resultingHandlerNames)
  142. ;
  143.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  144.         Macro
  145.         _OSAGetHandlerNames
  146.             move.l              #$000C110D,-(sp)
  147.             moveq               #0,D0
  148.             dc.w                $A82A
  149.         EndM
  150.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  151.         IMPORT_CFM_FUNCTION OSAGetHandlerNames
  152.     ENDIF
  153.  
  154. ;
  155. ; pascal OSAError OSAGetAppTerminology(ComponentInstance scriptingComponent, long modeFlags, FSSpec *fileSpec, short terminologyID, Boolean *didLaunch, AEDesc *terminologyList)
  156. ;
  157.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  158.         Macro
  159.         _OSAGetAppTerminology
  160.             move.l              #$0012110A,-(sp)
  161.             moveq               #0,D0
  162.             dc.w                $A82A
  163.         EndM
  164.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  165.         IMPORT_CFM_FUNCTION OSAGetAppTerminology
  166.     ENDIF
  167.  
  168. ;  Errors:
  169. ;       errOSASystemError        operation failed
  170. ;    
  171.  
  172. ;
  173. ; pascal OSAError OSAGetSysTerminology(ComponentInstance scriptingComponent, long modeFlags, short terminologyID, AEDesc *terminologyList)
  174. ;
  175.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  176.         Macro
  177.         _OSAGetSysTerminology
  178.             move.l              #$000A110B,-(sp)
  179.             moveq               #0,D0
  180.             dc.w                $A82A
  181.         EndM
  182.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  183.         IMPORT_CFM_FUNCTION OSAGetSysTerminology
  184.     ENDIF
  185.  
  186. ;  Errors:
  187. ;       errOSASystemError        operation failed
  188. ;    
  189.  
  190. ;  Notes on terminology ID
  191. ;
  192. ;    A terminology ID is derived from script code and language code
  193. ;    as follows;
  194. ;
  195. ;        terminologyID = ((scriptCode & 0x7F) << 8) | (langCode & 0xFF)
  196. ;
  197.  
  198.  
  199. ; **************************************************************************
  200. ;    Obsolete versions provided for backward compatibility:
  201. ;
  202.  
  203. ;
  204. ; pascal OSAError ASSetProperty(ComponentInstance scriptingComponent, OSAID contextID, const AEDesc *variableName, OSAID scriptValueID)
  205. ;
  206.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  207.         Macro
  208.         _ASSetProperty
  209.             move.l              #$000C1101,-(sp)
  210.             moveq               #0,D0
  211.             dc.w                $A82A
  212.         EndM
  213.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  214.         IMPORT_CFM_FUNCTION ASSetProperty
  215.     ENDIF
  216.  
  217. ;
  218. ; pascal OSAError ASGetProperty(ComponentInstance scriptingComponent, OSAID contextID, const AEDesc *variableName, OSAID *resultingScriptValueID)
  219. ;
  220.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  221.         Macro
  222.         _ASGetProperty
  223.             move.l              #$000C1102,-(sp)
  224.             moveq               #0,D0
  225.             dc.w                $A82A
  226.         EndM
  227.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  228.         IMPORT_CFM_FUNCTION ASGetProperty
  229.     ENDIF
  230.  
  231. ;
  232. ; pascal OSAError ASSetHandler(ComponentInstance scriptingComponent, OSAID contextID, const AEDesc *handlerName, OSAID compiledScriptID)
  233. ;
  234.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  235.         Macro
  236.         _ASSetHandler
  237.             move.l              #$000C1103,-(sp)
  238.             moveq               #0,D0
  239.             dc.w                $A82A
  240.         EndM
  241.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  242.         IMPORT_CFM_FUNCTION ASSetHandler
  243.     ENDIF
  244.  
  245. ;
  246. ; pascal OSAError ASGetHandler(ComponentInstance scriptingComponent, OSAID contextID, const AEDesc *handlerName, OSAID *resultingCompiledScriptID)
  247. ;
  248.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  249.         Macro
  250.         _ASGetHandler
  251.             move.l              #$000C1104,-(sp)
  252.             moveq               #0,D0
  253.             dc.w                $A82A
  254.         EndM
  255.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  256.         IMPORT_CFM_FUNCTION ASGetHandler
  257.     ENDIF
  258.  
  259. ;
  260. ; pascal OSAError ASGetAppTerminology(ComponentInstance scriptingComponent, FSSpec *fileSpec, short terminologID, Boolean *didLaunch, AEDesc *terminologyList)
  261. ;
  262.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  263.         Macro
  264.         _ASGetAppTerminology
  265.             move.l              #$000E1105,-(sp)
  266.             moveq               #0,D0
  267.             dc.w                $A82A
  268.         EndM
  269.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  270.         IMPORT_CFM_FUNCTION ASGetAppTerminology
  271.     ENDIF
  272.  
  273. ;  Errors:
  274. ;        errOSASystemError        operation failed
  275. ;    
  276.  
  277. ; *************************************************************************
  278.  
  279.  
  280.     ENDIF ; __ASDEBUGGING__ 
  281.  
  282.